package com.guess.study.designpattern.factory.factorymethod.client;

import com.guess.study.designpattern.factory.factorymethod.factory.ConcreteCreatorA;
import com.guess.study.designpattern.factory.factorymethod.factory.ConcreteCreatorB;
import com.guess.study.designpattern.factory.factorymethod.factory.Creator;
import com.guess.study.designpattern.factory.factorymethod.product.Product;

/**
 * Created by tianran on 2019-06-06.
 */
public class Client {
    public static void main(String[] args) {
        Creator creatorA = new ConcreteCreatorA();
        Product productA = creatorA.createProduct();
        productA.doSomething();
        productA.doAnything();

        Creator creatorB = new ConcreteCreatorB();
        Product productB = creatorB.createProduct();
        productB.doSomething();
        productB.doAnything();
    }
}
